package com.example.demo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.model.Product;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ProductDao extends BaseMapper<Product> {
    Product findById(Integer pid);
    int insertProduct(Product product);
    Product findByNameAndUid(String pname,Integer uid);
    int updateNumByPid(Integer pid,Integer stock);
    List<Product> findByTypes(String types);
    List<Product> findByUid(Integer uid);
    int deleteProduct(Integer pid);
}
